Learn R Programming

iDynoR (version 1.0)

Technique 1: Read in Simulation Results: Technique 1: Read in Simulation Results

Description

The iDynoMiCS simulation produces a set of XML files containing simulation output, either for each individual of each species, or each solute grid, or a summary of each species type and grid, for each timestep. These files are known as agent_state, agent_sum, env_state, and env_sum files: a detailed description of each can be found in the iDynoMiCS tutorial available from iDynoMiCS.org.

This method reads an XML file into R, returning this as a data frame that can then be accessed by the other methods within this package. Thus, this method is one of the key methods that you will use if you are utilising this package to analyse simulation results. This method works with all the four files specified above.

Note that to use this method, you should extract the ZIP files produced by iDynoMiCS before running this method.

Usage

readSimResultFile(resultFolder, resultFileType, timePoint)

Arguments

resultFolder
The directory containing all the simulation results. Note that this should not be the folder extracted from the zip file, but the folder where iDynoMiCS saves the simulation responses
resultFileType
The output response file type to read in. This should be either agent_State, agent_Sum, env_State, or env_Sum
timePoint
The simulation timepoint to process

References

Section 5 of the iDynoMiCS tutorial explains in detail how each output file is structured

Examples

Run this code
## Not run: 
# # DONTRUN IS SET SO THIS IS NOT EXECUTED WHEN PACKAGE IS COMPILED - BUT THIS
# # HAS BEEN TESTED THOROUGHLY BEFORE UPLOADING TO THE REPOSITORY
# 
# simResponse<-
# readSimResultFile("/home/user/iDynoMiCS/results/","agent_State",40)
# ## End(Not run)

Run the code above in your browser using DataLab